
package com.jf.cloud.platform.feign;

import com.jf.cloud.common.feign.CoreConfigFeignClient;
import com.jf.cloud.common.response.ServerResponseEntity;
import com.jf.cloud.platform.service.SysConfigService;
import io.swagger.v3.oas.annotations.Hidden;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zz
 */
@RestController
@Hidden
public class CoreConfigFeignController implements CoreConfigFeignClient {

    @Autowired
    private SysConfigService sysConfigService;

    @Override
    public ServerResponseEntity<String> getConfig(String key) {
        return ServerResponseEntity.success(sysConfigService.getValue(key));
    }

}
